PATH![]() |
![]() ![]() |
Multiprocessing Services provides a number of functions you can use to handle exceptions and to aid in debugging.
By default, if you do not register an exception handler, and no debuggers are registered, a task terminates when it takes an exception. If debuggers or exception handlers exist, then the task is suspended when an exception occurs and a message is sent to the appropriate debugger or handler.
If desired, you can install an exception handler for a task by calling the function MPSetExceptionHandler . When an exception occurs, a message is sent to a designated queue, which your exception handler can wait upon.
In addition, you can register one or more debuggers with Multiprocessing Services by calling the function MPRegisterDebugger . When calling MPRegisterDebugger , you must specify the queue to which you want the exception message to be sent as well as a debugger level. The debugger level is simply an integer that indicates where to place this debugger in the hierarchy of registered debuggers. In addition, When an exception occurs, the order of notification for handlers is as follows:
At each level, the handler can choose to do either of the following:
If you want to throw an exception to a task, you can use the MPThrowException function.